
<template>
  <div class="houseShareList-box box-shadow-1px-bottom">
    <div class="body" @click="jumpShareData(item)">
      <div class="cover-img">
        <img :src="item.thumbHeadImgUrl || item.linkerUrl || require('@/assets/img/dynamics/palceholder-img.png')">
      </div>
      <div class="content">
        <div class="row">
          <h3 class="name ellipsis">{{item.linkerName}}</h3>
          <p class="count">
            <span class="dot" :class="item.dynamicCount ? '' : 'is-zero'"></span>
            <span>{{item.dynamicCount || 0}}条动态</span>
            <i class="iconfont icon-arrow-"></i>
          </p>
        </div>
        <p>{{ item.city }} {{item.area}} </p>
        <p class="money-time">
          <span>{{ item.price == 0?"价格待定": item.price+item.priceUnit }}</span>
          <span>{{ item.updateTimeStr }}</span>
        </p>
      </div>
    </div>
  </div>
</template>
<script>
import strFormat from '@/filters/strFormat'
export default {
  props: {
    item: Object
  },
  data() {
    return {}
  },
  created() {},
  methods: {
    /**
     * 查看动态
     */
    jumpShareData(item) {
      this.$emit('on-click', item)
    }
  }
}
</script>
<style lang="less" scoped>
.houseShareList-box {
  font-size: 12px;
  font-family: PingFangSC-Regular;
  font-weight: 400;
  background: #fff;
  color: #666;
  padding: 16px 16px 16px 14px;
  // overflow: hidden;
  // margin-top: 1px;
  .body {
    display: flex;
    height: 60px;
    // overflow: hidden;
    .cover-img {
      img {
        width: 80px;
        height: 60px;
        border-radius: 6px;
      }
    }
    .content {
      flex: 1;
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      position: relative;
      margin-left: 12px;
      p {
        color: #405170;
        font-size: 12px;
        line-height: 16px;
      }
      .money-time {
        display: flex;
        justify-content: space-between;
        span:last-child {
          color: #9BA4B4;
        }
      }
      .row {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 14px;
        font-family: PingFangSC-Medium;
        font-weight: 500;
        .name {
          font-size: 18px;
          line-height: 24px;
          font-family: PingFangSC-Semibold;
          font-weight: 600;
          color: #13284D;
          max-width: 170px;
        }
        .ellipsis {
          overflow: hidden;
          text-overflow: ellipsis;
          -o-text-overflow: ellipsis;
          white-space: nowrap;
        }
        .count {
          color: #9ca5b5;
          display: flex;
          align-items: center;
          .dot {
            width: 8PX;
            height: 8PX;
            display: inline-flex;
            background-color: #007AE6;
            border-radius: 50%;
            margin-right: 8px;
          }
          .is-zero {
            background-color: #9ca5b5;
          }
        }
      }
    }
  }
}
</style>
